#include <windows.h>
#include "CChar.h"
#include "CPartyMapPacket.h"

//Sends the blue / teal colour dots on your map to represent party members
CPartyMapPacket::CPartyMapPacket(CChar * partyMember,unsigned char zone) {	
	memset(this->data, 0, 0x0C*2);
	this->type = 0xA0;
	this->size = 0x0C;
	
	if (partyMember != NULL) {
		if (partyMember->getZone() == zone) {
			memcpy(&this->data[0x04-0x04],&partyMember->m_id, sizeof(unsigned int));
			this->data[0x08-0x04] = zone;
			unsigned short targId = partyMember->getTargId();
			memcpy(&this->data[0x0A],&targId, sizeof(unsigned short));
			memcpy(this->data+0x0C-0x04, &(partyMember->loc.p.x), sizeof(float)*3);

		}
	}
}

CPartyMapPacket::~CPartyMapPacket() {

}
